﻿using gt.dotnetcore.webapi.extensions.ApiException;
using gt.dotnetcore.webapi.extensions.ApiLogging;
using Microsoft.AspNetCore.Builder;
using System;
using System.Collections.Generic;
using System.Text;

namespace gt.dotnetcore.webapi.extensions
{
    public static class MiddlewareExtensions
    {
        public static IApplicationBuilder UseGlobalException(this IApplicationBuilder builder)
        {
            return builder.UseMiddleware<GlobalExceptionMiddleware>();
        }
        public static IApplicationBuilder UseGlobalApiLogging(this IApplicationBuilder builder)
        {
            return builder.UseMiddleware<GlobalApiLoggingMiddleware>();
        }
    }
}
